<template>
  <h1>我是App组件</h1>
  <h3>姓名:{{ name }}</h3>
  <h3>年龄:{{ age }}</h3>
  <button @click="sayHello">消息</button>
</template>

<script>
// import { h } from "vue";
export default {
  name: "App",
  setup() {
    let name = "张三";
    let age = 18;
    function sayHello() {
      console.log(`我叫${name},我${age}岁`);
    }
    return {
      name,
      age,
      sayHello,
    };
    // return () => h("h3", "test");
  },
};
</script>

<style>
</style>
